﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UIT.Controls.Containers;
using UIT.Controls;

namespace UIT
{
    public class UnkownControlRenderer : IControlRenderer
    {
        #region IControlRenderer Members

        public void Render(Controls.IControl control)
        {
            if (control == null)
                return;
            if (control.IsContainer)
            {
                foreach (IControl child in ((IContainer<IContainer, IControl>)control).Children)
                    Manager.Control.GetRenderer(child).Render(child);
            }
        }

        #endregion

        #region IRenderer Members

        public RendererManager Manager
        {
            get;
            private set;
        }

        public void Initialize(RendererManager manager, object userObject)
        {
            Manager = manager;
        }

        #endregion
    }
}
